<%--
  Created by IntelliJ IDEA.
  User: Ssw
  Date: 2018-10-18
  Time: 9:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/bootstrap.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/js/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <%--日期控件--%>

    <style>
        body{
            width: 1325px;
            height:50%;
            overflow: auto;
        }
        *{
            background: #fafafa ;
            font-family: 楷体;
        }
        input{
            background: #fafafa
        }
        #seleAll select{
            width: 200px;
            height:30px;
        }
        #seleAll select option{
            width: 200px;
            height:30px;
        }
        #tt1{
            width: 200px;
            height:30px;
        }
        #tt2{
            width: 200px;
            height:30px;
        }
        #tt3{
            width: 200px;
            height:30px;
        }
        #tt4{
            width: 200px;
            height:30px;
        }
        #tt5{
            width: 200px;
            height:30px;
        }
        #tt6{
            width: 200px;
            height:30px;
        }
        #tt7{
            width: 200px;
            height:30px;
        }
        .test2{
            width: 380px;
            height: 30px;
        }
        .test{
            width:130px;
            height:30px;
            padding-left: 25px;
        }
        .xmap li{

            margin-left: 15px;
        }
        .xmbtest{

            border-bottom: 1px solid #afbdc9;
            font-size: 15px;
            text-align: center;
        }

        .xmbtest td{

            border: 0px solid black;
        }
        #xmbbody tr{
            border: 0px solid red;
            font-size: 15px;
            text-align: center;
        }
        #xmbbody td{
            border: 0px solid black;
        }
        .chimaxe{
            width:450px;
            height:25px;
            font-size: 12px;
            padding-left: 10px;
            font-family: 楷体;

        }
        .chimache input{
            width: 20px;
            height:25px;

        }
        #onecolor td{
            background:#BEE9F0;
        }
       .hocolors:hover{

            background-color: lightgoldenrodyellow;
        }
        .fenye{

            width: 500px;
            border: 0px solid black;
            height: auto;
            text-align: center;
            position: absolute;
            left:250px;
            top:360px;
            /*margin-top: 350px;
            margin-left: 350px;*/
        }
        #colorlibrary tr{
            width: 198px;

        }
        #colorlibrary td{
            width: 196px;
            border-bottom: 1px solid #9dbdd6;
        }

        /*尺寸*/
        .cctable{
            width: 600px;
        }
        .cctest{
            border-bottom: 1px solid #afbdc9;
            font-size: 15px;
            text-align: center;
            width:600px;
        }

        .cctest td{
            width:180px;
            border: 0px solid black;
        }
    </style>
</head>
<body>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/vue.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/vue.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/vue-resource.js"></script>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<div id="seleAll">
        <div style="width: 1325px;height: 200px; /*border:1px solid red*/" >
<form class="form-inline" role="form">

    <div class="test" style="color: red;"><b>客户</b> </div>
    <select class="form-control" @change="test()" ref="clid" >
        <option value="0">---请选择---</option>
    <option v-for="clientss in clientss" :value="clientss.clid" >{{clientss.clname}}</option>
    </select>

        <div class="test" style="color: red;">品牌</div>
        <select class="form-control" @change="test()" ref="brandid" >
            <option value="0">---请选择---</option>
            <option v-for="brandss in brandss" :value="brandss.brandid" >{{brandss.brandname}}</option>

        </select>

    <div class="test" style="color: red;" >季度</div>
    <select class="form-control"  ref="seaid" >
        <option value="0">---请选择---</option>
        <option v-for="seasonss in seasonss" :value="seasonss.seaid" >{{seasonss.seaname}}</option>

    </select>

    <div class="test" style="color: red;">版型</div>
    <select class="form-control"  ref="plaid">
        <option value="0">---请选择---</option>
        <option v-for="platess in platess" :value="platess.plaid" >{{platess.planame}}</option>

    </select>


    <div class="test" style="color: red;">接单日期</div>
    <input type="text" class="form-control test2" id="tt1" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" >

    <div class="test" style="color: red;">版期</div>
    <input type="text" class="test2 form-control" id="tt2"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"  >

    <div class="test" style="color: red;">状态</div>
    <select class="form-control" >
        <option value="0">---请选择---</option>
        <option value="正在开发" >正在开发</option>
        <option value="开发终止" >开发终止</option>
        <option value="开发完成" >开发完成</option>

    </select>
    <div class="test" style="color: red;">开发单号</div>
    <input type="text" class="test2 form-control" id="tt3" :value="uuid" readonly >

    <div class="test" style="color: red;">样板倍数</div>
    <input type="text" class="test2 form-control" id="tt4" onkeyup="value=value.replace(/[^\?\d.]/g,'')">

    <div class="test" style="color: red;">款号</div>
    <select class="form-control" @change="seleks()" ref="haoid">
        <option value="0">---请选择---</option>
        <option v-for="stylehaoss in stylehaoss" :value="stylehaoss.haoid">{{stylehaoss.haoname}}</option>
    </select>

    <div class="test" style="color: red;">款式</div>
    <select class="form-control"  ref="designid" >
        <option value="0">---请选择---</option>
        <option v-for="designss in designss" :value="designss.designid">{{designss.desname}}</option>
       <%-- <option v-for="stylehaoss in stylehaoss" :value="stylehaoss.haoid">{{stylehaoss.haoname}}</option>--%>
    </select>

    <div class="test" style="color: red;">跟单</div>
    <input type="text" class="test2 form-control" id="tt5" value="张三" readonly>

    <div class="test">生产厂家</div>
    <input type="text" class="test2 form-control" id="tt6" >
    <div class="test">备注</div>
    <input type="text" class="test2 form-control" id="tt7" >

</form>
    </div>
<div>
    <ul id="daohang" class="nav nav-pills xmap" style="width: 1325px; border-top: 3px solid steelblue;border-bottom:3px solid steelblue ">
        <li><a @click="ximaclick()">细码表</a></li><%--class="active"--%>
        <li><a @click="chicunclick()">尺寸</a></li>
        <li><a href="#">BOM</a></li>
        <li><a href="#">用料</a></li>
        <li><a href="#">档案</a></li>
    </ul>
    <%--细码表导航栏--%>
    <div id="ximadaohang" style="width: 1325px;height: 40px;">
        <button @click="seleAllSize()" type="button" class="btn btn-default" data-toggle="modal" data-target="#samodel"><span class="glyphicon glyphicon-folder-close"></span>  尺码</button>
        <button @click="addLine()" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span>  增行</button>

    </div>

    <%--细码表div--%>
    <div id="ximadiv" style="width: 1325px;height: 500px;border-top: 1px solid black;">
        <div style="width: 905px;height: 500px; overflow: auto">
        <table class="xmbtable table">
            <tr class="xmbtest">
                <td>颜色名称</td>
                <td>色值</td>
                <td>尺码</td>
                <td>数量</td>
                <td style='width:100px;'>操作</td>
            </tr>
            <tbody id="xmbbody">

            </tbody>
        </table>
        </div>

    </div>
    <%--尺寸表导航栏--%>
    <div style="width: 1325px;height: 40px;display: none" id="chicundaohang">
        <button @click="addLine()" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus-sign"></span>导入尺寸表</button>
    </div>
    <%--尺寸表div--%>
    <div style="width: 1325px;height: 500px;border-top: 1px solid black;display: none" id="chicundiv">
        <div style="width: 905px;height: 500px; overflow: auto">
            <table class="cctable table">
                <tr class="cctest">
                    <td>部位</td>
                    <td>度量</td>
                    <td>描述</td>

                </tr>
                <tbody id="chicunbody">
                <tr v-for="clothArr in clothArr" class="cctest">
                    <td>{{clothArr.clothname}}</td>
                    <td></td>
                    <td>{{clothArr.clothrmark}}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>

</div>


</div>
<%--data-toggle="modal" data-target="#myModal"--%>


<!-- 尺寸模态框（Modal） -->
<div class="modal fade" style="background-color:rgba(0,0,0,0);"  id="samodel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="background: #F1F2F2;font-family: 楷体;">
        <div class="modal-content" style="background: #F1F2F2;font-family: 楷体;" id="SizeModels">
            <div class="modal-body" style="background: #F1F2F2;font-family: 楷体;" >

                <table style="background:black;font-family: 楷体;">
                    <tr id="onecolor">
                        <td class="chimache"><input type="checkbox" name="ssss" onclick="selecteAlldd(this)"  id="selecteAll" class="seall"></td>
                        <td class="chimaxe" style="text-align: center;background:#BEE9F0">尺码</td>
                    </tr>
                    <tr v-for="allsize in allsize" class="hocolors">
                        <div style="width: 470px;" class="divaaa">
                        <td class="chimache"><input type="checkbox"  class="qqqq" onclick="xuanze(this.checked)" name="sizename" :value="allsize.sizeid"></td>
                            <td class="chimaxe"><span>{{allsize.sizename}}</span></td>
                        </div>
                    </tr>
                </table>
            </div>

            <div class="modal-footer" style="background: #D6D7DC;">
                <button type="button" class="btn btn-default" data-dismiss="modal" @click="affchima()">确认
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<%--颜色模态框--%>
<div class="modal fade" style="background-color:rgba(0,0,0,0);"  id="colormodel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="background: #EDF4FF;font-family: 楷体;width: 800px;height:450px;margin-left: 200px;">
        <div class="modal-content" style="background: #EDF4FF;font-family: 楷体;" id="what">
            <div class="modal-body" style="background: #EDF4FF;font-family: 楷体; width: 800px;height:450px;" >
            <div id="colorttype">
                <div style="height:420px;overflow:auto;width:150px;border: 2px solid #95B8E7;float: left" id="colorttypetable" >
                    <div style="height:auto;width:100px;">
                       <%-- <table >
                            <tr  v-for="colorTypes in colorTypes">
                                <td>{{colorTypes.tintypename}}</td>
                            </tr>
                        </table>--%>
                        <span   style="margin-left: 5px;"><a  ondblclick="copyval(this)" class="glyphicon glyphicon-folder-open">所有类别</a></span><br/>
                           <div    style="width: 145px;height:20px;padding-top: 5px;border:0px solid red;padding-left:30px;font-size: 12px;" v-for="colorTypes in colorTypes"> <a ondblclick="copyval(this)" class="glyphicon glyphicon-list-alt">{{colorTypes.tintypename}}</a></div>
                    </div>
                </div>
                <div id="colorlibrary" style="height:420px;width:600px;border: 2px solid #95B8E7;float: left">
                    <div class="input-group input-group-lg">
                        <p></p>
                        <label  class="col-sm-2 control-label" style="text-align: center;line-height:25px;width:60px;height: 25px;font-size: 14px;">颜色</label>  <input type="text" ref="testval" class="form-control" style="width: 190px;height: 25px;font-size:15px;color:#999999"  placeholder="请输入颜色名称">
                        <label  class="col-sm-2 control-label" style="text-align: center;line-height:25px;width:60px;height: 25px;font-size: 14px;">类别</label>  <input class="form-control" style="float: left;margin-left:20px;width: 100px;height: 25px;font-size:15px;color:#999999" readonly value="所有类别" ref="typeval">
                        <button onclick="likeselecolor()" class="btn btn-info" style="text-align: center;line-height:10px;float: left;margin-left:20px;width: 80px;height: 25px;font-size:15px;">查询</button>
                        <br/><p>  </p>
                    </div>
                    <table class="table" style="text-align: center">
                        <tr style="background-color: #e8e8e8;border-bottom:3px solid #afbdc9">
                            <td style="background-color: #e8e8e8">颜色</td>
                            <td style="background-color: #e8e8e8">色值</td>
                            <td style="background-color: #e8e8e8">类别</td>
                            <td style="background-color: #e8e8e8">操作</td>
                        </tr>
                        <tr v-for="colorLibrary in colorLibrary">
                            <td style="display: none">{{colorLibrary.tinctid}}</td>
                            <td>{{colorLibrary.tinctname}}</td>
                            <td>{{colorLibrary.tinctzhi}}</td>
                            <td>{{colorLibrary.tintypename}}</td>
                            <td><button class="btn btn-default" data-dismiss="modal" onclick="submitcolor(this)">确定</button></td>
                        </tr>
                    </table>
                    <div id="fanye">
                        <ul class="pagination  pagination-lg fenye">
                            <li><a @click="shang.shang(1)">上一页</a></li>
                            <li><a>{{colortype.CurrPage}}/{{colortype.MaxPage}}</a></li>
                            <li><a  @click="shang.xia(1)">下一页</a></li>
                            <li><a><input  v-model="colortype.zzz" style="width:70px;height: 20px; font-size: 15px;" ref="vals"
                                           onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"/>/{{colortype.MaxPage}}</a></li>
                            <li><a  @click="shang.fan(1)">跳转</a></li>
                        </ul>
                    </div>
                </div>
                <%--<table id="colorttypetable" style="height:50px;overflow:hidden;width:100px;">
                    <tr v-for="colorTypes in colorTypes" >
                        <td>{{colorTypes.tintypename}}</td>
                    </tr>
                </table>--%>
            </div>
            </div>
            <div class="modal-footer" style="background: #D6D7DC;width: 800px;">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</body>
</html>

<script>

                               /*************/
    $(function(){

        load.load();
    });



    Vue.use(VueResource);
    var load=new Vue({
        el:"#seleAll",
        data:{
            /*客户*/
            clientss:'',
            /*所有季度*/
            seasonss:'',
            /*所有样板类型*/
            platess:'',
            /*所有品牌*/
            brandss:'',
            /*所有款号*/
            stylehaoss:'',
            /*根据款号查款式*/
            designss:'',

            clid:'',
            haoid:'',

            /*开发单号*/
            uuid:'',
            //根据所选尺码得到的信息
            chimaxx:'',
            a:1,
            //款式id
            designid:'',
            //款式的服装部位
            clothArr:'',
            //chval:new Map(),




        },
        methods:{
/*页面加载所有相关基本信息*/
            load:function(){
                var url="/consele/seleAll"
                this.$http.post(url).then(
                    function (data) {
                        this.clientss= data.body.clientss;
                        this.seasonss= data.body.seasonss;
                        this.platess= data.body.platess;
                        this.brandss=data.body.brandss;
                        this.stylehaoss=data.body.stylehaoss;
                        this.uuid=data.body.uuid;
                    },
                    function(){})
            },
            test:function(){
                //alert(this.$refs.clid.value);
            },
            /*根据款号得到所有款式*/
            seleks:function () {
                //alert(this.$refs.haoid.value)
                var url="/consele/seledesign/"+this.$refs.haoid.value;
                this.$http.post(url).then(
                    function(data){
                        this.designss=data.body;
                    }
                )
            },
            //查询所有尺码
            seleAllSize:function(){
                var url="/consele/seleAllsize";
                this.$http.post(url).then(
                    function(data){
                        //查询出的所有尺码放到sizeModel作用域下
                        sizeModel.allsize=data.body;
                    }
                )
            },
            //增行
            addLine:function(){

                if (chval.size<1){
                    alert("尺码不能为空");
                }else{

                    //alert(sizeModel.chval);
                    //var sjson=JSON.stringify(sizeModel.chval);
                   // alert(sizeModel.chval);
                  /* var url="/consele/seleSize/"+sizeModel.chval;
                    this.$http.post(url, {'chval':sizeModel.chval},{arrayFormat:'brackets'}).then(function (data) {
                        //testxmbbody.chimaxx=data.body;
                        //alert(data.body);
                        var dd=data.body;*/
                        var tr="<tr>";
                        tr+="<td><input style='display: none' class='yanseid"+load.a+"' value='' readonly/><input  class='yansename"+load.a+"' onclick='testxmbbody.dianji("+load.a+")'  value='' data-toggle='modal' data-target='#colormodel' readonly/></td>";
                        tr+="<td><input readonly class='yanseval"+load.a+"'/></td>";
                        tr+="<td><select><option>--请选择尺码--</option>";

                        //tr+="<option  v-for='chval in chval' :value='chval.sizeid'>'{{chval.sizename}}'</option>";
                    chval.forEach(function(value,key){
                       tr+="<option value="+key+">"+value+"</option>";
                    });

                        //tr+="<option v-for='va in chval' :value='$key'>"+"+{{+"+value+"}}+"</option>";
                   /* for (var sp=0;sp<chval.length;sp++){
                            tr+="<option value="+dd[sp].sizeid+">"+dd[sp].sizename+"</option>";
                        }*/
                        tr+="</select></td>";
                        tr+="<td><input onkeyup=\"value=value.replace(/^(0+)|[^\\d]+/g,'')\"/></td>";
                        tr+="<td style='width:100px;height:30px;'><button  onclick='deletr(this)' class='btn btn-default' style='height:27px;font-size:16px;padding-top:2px;text-align: center;line-height: 10px;'><span class=' glyphicon glyphicon-minus-sign'></span>删除</button></td>";
                        tr+="<tr>";
                        $("#xmbbody").append(tr);

                        load.a++;
                        //alert(testxmbbody.chimaxx);
                    /*})*/
                }
            },
            //尺寸导航
            chicunclick:function() {
                if (load.$refs.designid.value != 0) {

                    //细码隐藏
                    $("#ximadaohang").hide();
                    $("#ximadiv").hide();
                    //尺码显示
                    $("#chicundaohang").show();
                    $("#chicundiv").show();

                    //alert(load.$refs.designid.value);
                    this.$http.post("/consele/selecloth/"+load.$refs.designid.value).then(function(data){
                       load.clothArr=data.body;
                        },
                        function () {

                    })
                } else {
                    alert("款式不能为空");
                }
            },
            //细码导航
            ximaclick:function(){
                //细码显示
                $("#ximadaohang").show();
                $("#ximadiv").show();
                //尺码隐藏
                $("#chicundaohang").hide();
                $("#chicundiv").hide();


            },
        }


    });


//删行
  function deletr(obj) {
      $(obj).parent().parent().remove();
  }






    //选中框的值
    var chval=new Map();
//所有尺码
    var sizeModel=new Vue({
        el:'#SizeModels',

        data:{
            /*所有尺码*/
            allsize:'',
            //全选框
            xuanxuan:'',
            //mapa:'',
        },
        methods:{
            affchima:function () {
                //清空数组
                 this.chval =[];
                $(".qqqq").each(function(){
                    if (this.checked){
                        //chimache
                        var v=this.value;
                        var ht=$(this).parent().next().children("span").text();
                        //load.chval+={v:ht};
                        //alert(load.chval);
                        //alert();
                        chval.set(v,ht)
                       //load.chval(sizeModel.mapa(v,ht));
                    }
                })
            }

        },


    });
//copy类别
    function copyval(ap) {

        colortype.$refs.typeval.value=$(ap).parent().text()
       // $("#typeval").value($(ap).parent().text());
        //alert($("#typeval").value());

    }
    //点击查询
    function   likeselecolor(){
        testxmbbody.colorpage(1,colortype.$refs.typeval.value,colortype.$refs.testval.value);
        //alert(colortype.$refs.testval.value);
        //alert(colortype.$refs.typeval.value);

    }
    //颜色
    var colortype=new Vue({
        el:'#what',
        data:{
            //颜色类别
            colorTypes:'',
            //颜色库
            colorLibrary:'',
            CurrPage:'',//当前页CurrPage
            MaxPage:'',//最大页数
            vals:'',
            zzz:'',
            typeval:'',
            testval:'',
            //获取他的行数 废弃
            colorindex:'',
        },method:{
            //这个失效莫名其妙
           /* likeselecolor:function(){
                alert(1);
            }*/
        }
    });

    //颜色相关
    var testxmbbody=new Vue({
        el:'#xmbbody',
        data:{
            chimaxx:'',
        },
        methods:{
            //查询颜色类别
            dianji:function (a){


                //行数给他
                shang.tabdex=a;
                //查询颜色类别 有测试一边
                this.$http.post("/consele/seleTincttype").then(function(data){
                    colortype.colorTypes=data.body;
                    this.colorpage();
                },function(){

                })
            },
            //查询颜色库所有颜色
            colorpage:function (pagenum,typecolor,colorname) {

                if (pagenum==null){
                    pagenum=1;
                }
                if (typecolor==null){
                    typecolor='所有类别';
                }
                if (colorname==null){
                    colorname='';
                }
                //查询颜色库所有颜色
                this.$http.post("/consele/seleseleTinct",{PageNum:pagenum,typecolor:typecolor,colorname:colorname},{emulateJSON: true}).then(function (data) {
                    colortype.CurrPage= data.body.pageNum;
                    colortype.zzz= data.body.pageNum;
                    colortype.MaxPage=data.body.pages;
                    colortype.colorLibrary=data.body.list;
                },function(){})
            },

        }
    });
    //叫颜色传到input框中

    function submitcolor(op) {

       // alert();
        //prev上一个兄弟节点
       var colorid=$(op).parent().prev().prev().prev().prev().text(); //颜色id
        var colorname=$(op).parent().prev().prev().prev().text();//颜色name
        var colorval=$(op).parent().prev().prev().text();//颜色色值
       // alert(shang.tabdex);
       // alert($(".yansename"+shang.tabdex+"").value());
        //alert(shang.tabdex);
        //id
        //alert($(".yanseid"+shang.tabdex+"").val());
        $(".yanseid"+shang.tabdex+"").val(colorid);
        //name
        $(".yansename"+shang.tabdex+"").val(colorname);
        //色值
        $(".yanseval"+shang.tabdex+"").val(colorval);
        //alert($(".yanseid"+shang.tabdex+"").value);

    }


//分页
    var shang=new Vue({
        el:'#fanye',
        data:{

            MaxPage:"",//最大页数
            vals:"",
            zzz:"",
            //tableindex
            tabdex:'',
        },
        methods:{
            fan:function(PageNum){
                if (colortype.$refs.vals.value==null){
                    colortype.$refs.vals.value=colortype.CurrPage;
                }
                if (colortype.$refs.vals.value==""){
                    colortype.$refs.vals.value=colortype.CurrPage;
                }
                if(colortype.$refs.vals.value>colortype.MaxPage){
                    colortype.$refs.vals.value=colortype.MaxPage;
                }
                testxmbbody.colorpage(PageNum,colortype.$refs.typeval.value,colortype.$refs.testval.value);
                //alert(this.$refs.vals.value);
                //load.fenye(this.$refs.vals.value,showhide.$refs.testval.value);


            },shang:function(PageNum){
                if (colortype.CurrPage-PageNum==0){
                    PageNum=1;

                }else{
                    PageNum=colortype.CurrPage-PageNum;
                }
                testxmbbody.colorpage(PageNum,colortype.$refs.typeval.value,colortype.$refs.testval.value);
               // load.fenye(PageNum, showhide.$refs.testval.value);

            },xia:function(PageNum){
                if (colortype.CurrPage+PageNum>colortype.MaxPage){
                    PageNum=colortype.CurrPage;
                }else{
                    PageNum=colortype.CurrPage+PageNum;
                }
                testxmbbody.colorpage(PageNum,colortype.$refs.typeval.value,colortype.$refs.testval.value);
                // showhide.$refs.testval.value
                //load.fenye(PageNum,showhide.$refs.testval.value);

            }
        }
    })





   //全选全不选  失效
   $("#selecteAll").click(function(){

       if(this.checked){
           $(".qqqq").each(function(){
               this.checked=true;
           });
       }else{
           $(".qqqq").each(function(){
               this.checked=false;
           });
       }
   });


   //CheckBox本身选择
   function  xuanze(xx){
       if(xx){
           $(".qqqq").each(function(){
               if (!this.checked){
                   $("#selecteAll").attr("checked",false);
                   return false;
               }else{
                   $(".seall").each(function(){
                       this.checked=true;
                   })
               }
           })
       }if (!xx){
           $(".qqqq").each(function(){
               if (this.checked){
                   $("#selecteAll").attr("checked",false)
                   return false;
               }else{
                   $("#selecteAll").attr("checked",true);
               }
           })
       }
   }
</script>